local M = {}

function M.isInBounds(target, x, y, tOffset)
	tOffset = tOffset or {}
	local tOffset = {
		xMin = tOffset.xMin or 0, xMax = tOffset.xMax or 0,
		yMin = tOffset.yMin or 0, yMax = tOffset.yMax or 0
	}
	local bounds = target.contentBounds
	return (x > bounds.xMin + tOffset.xMin and x < bounds.xMax + tOffset.xMax)
			and
			(y > bounds.yMin + tOffset.yMin and y < bounds.yMax + tOffset.yMax)
end

function M.setXY(target, x, y)
	target.x = x
	target.y = y
end

function M.setSize(target, width, height)
	target.width = width
	target.height = height
end

return M